var app = getApp();

Page({
    data: {
        submitbtn: !0,
        state: "",
        f_id: "",
        over: !1,
        pfover:!1,
        openid: "",
        b_openid:"",
        b_id: "",
        b_mid: "",
        widths: 300,
        heigths: 400,
        jobday:0,
        current: 0,
        switerShow:false,
       evaluations: [
       {
        id: 0,
        name: "作品审核",
        image: "https://s1.ax1x.com/2018/08/05/PDMaCV.png",
       }
       ],
       none: [ {
            img: "/hyb_jianzhi/images/btn_bg.png",
            con: "用户暂无上传作品"
        } ],
       height:0
    },
    onLoad: function(t) {
        var a = this, e = t.f_id,td=t.days,b_id=t.b_id,b_openid=t.b_openid;
        a.setData({
            f_id: e,
            b_openid:b_openid,
            b_id:b_id
        }), a.getBase(), a.getUpReview();
    },
     callPhone: function(t) {
        this.getform(t.detail.formId), wx.makePhoneCall({
            phoneNumber: t.currentTarget.dataset.phone
        });
    },
    getBase: function() {
        var a = this;
        app.util.request({
            url: "entry/wxapp/Base",
            success: function(t) {
                a.setData({
                    base: t.data.data
                });
            }
        });
    },
    getUpReview: function() {
        var e = this;
        app.util.request({
            url: "entry/wxapp/Upreview_show",
            data: {
                openid: e.data.b_openid,
                b_id: e.data.b_id
            },
            success: function(a) {
                   e.setData({
                     imglist:a.data.data.imagelist
                   }) 
            }
        });
    },
       //图片点击事件
 imgYu:function(event){
 var src = event.currentTarget.dataset.src;//获取data-src
 var imgList = event.currentTarget.dataset.list;//获取data-list
 //图片预览
 wx.previewImage({
  current: src, // 当前显示图片的http链接
  urls: imgList // 需要预览的图片http链接列表
 })
 },
     getBaomingxq: function(t, a) {
        var e = this;
        app.util.request({
            url: "entry/wxapp/Baomingxq",
            data: {
                state: a,
                f_id: t
            },
            success: function(t) {
                console.log("list"+t.data.data), e.setData({
                    list: t.data.data
                });
            }
        });
    },
    hdlJobComment:function(a){
        var self = this;
        self.getform(a.detail.formId);
          app.util.request({
            url: "entry/wxapp/Upreview_update",
            data: {
               openid: self.data.b_openid,
               b_id: self.data.b_id,
               reason:self.data.reason
            },
            success: function(t) {
              self.setData({
                over: !1,
                pfover:!1,
              });
            }
        });
    },
    hdlShowImg:function(){
        var self = this;
        self.setData({
            switerShow:true
        })
    },
    hideClickSwiter:function(){
        var self = this;
        self.setData({
            switerShow:false
        })
    },
    bindCollectChange:function(a) {
        this.setData({
            reason: a.detail.value
        });
    },
    daogang: function(t) {
        var a = this;
        app.util.request({
            url: "entry/wxapp/Daogang",
            data: {
                b_id: a.data.b_id
            },
            success: function(t) {
                a.getBaomingxq(a.data.f_id, a.data.state);
                  wx.navigateTo({
                     url: "/hyb_jianzhi/shop_apply/shop_apply" 
                 });
            }
        });
    },
    pflist:function(t) {
        this.setData({
            pfover: !0
        });
    },
    getform: function(a) {
        var self = this;
        console.log(a), app.util.request({
            url: "entry/wxapp/Formid",
            data: {
                openid: self.data.b_openid,
                formid: a
            },
            success: function(a) {}
        });
    },
    hideClick: function() {
        this.setData({
            over: !1,
            pfover:!1,
        });
    },
    remove: function(t) {},
    onReady: function() {},
    onShow: function() {
        this.setData({
            over: !1,
            pfover:!1,
            submitbtn: !0
        }), this.getBaomingxq(this.data.f_id, this.data.state);
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});